<!DOCTYPE html>
<html>

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="manifest" href="./manifest.json">
  <script src="https://unpkg.com/vue@3"></script>
  <style>
    html,
    body {
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100vw;
      height: 100vh;
      background-color: #f0f0f0;
    }

    iframe {
      width: 100vw;
      /* 设置宽度为100%视口宽度 */
      height: 100vh;
      /* 以16:9的比例计算高度 */
      border: none;
      /* border: 5px solid lightcoral; */
    }
  </style>
</head>

<body>
  <div id="app">
    <!-- https://www.kitcion.cc/h5/#/ -->
    <iframe v-if="is_iframe" :src="open_url" frameborder="no"></iframe>
  </div>
  <script>
    const { createApp } = Vue;

    createApp({
      data() {
        return {
          is_iframe: null,
          
          open_url: null
        };

      },
      mounted() {
        const is_iframe = localStorage.getItem('is_iframe')
        this.is_iframe = is_iframe - 0
        const url = localStorage.getItem('url')
        this.open_url = url
        console.log('is_iframe', this.is_iframe);
        console.log('url', this.open_url);
        if (this.is_iframe === 0) {
          setTimeout(() => {
            window.location.href = this.open_url;
          }, 500) 
        }
      },
      methods: {

      }
    }).mount('#app');
  </script>
</body>

</html>